<?php 
include_once('connection/connection.php');
include('header.php');
include('menu.php');
include('config.php');
$frm=$_SESSION['form_id'];
$id1=$_SESSION['id1'];
$dis_name=$_SESSION['dis_name'];
$qr="select * from tbl_dtls_q3_loc where form_id='$frm'";
$res=mysql_query($qr);
$row1=mysql_fetch_array($res);
if(isset($_POST['back']))
{ 
	header('Location: view_q3_2.php');
}	
if(isset($_POST['submit']))
{ 
	header('Location: view_q3_4.php');
}	
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="css/style_question.css" type="text/css" rel="stylesheet" />
<title>View Q3</title>
</head>
<body>
<div align="center">
<form action="" method="post" enctype="multipart/form-data">
	<table border="0" width="800" id="table1" cellspacing="0" cellpadding="0">
		<tr>
			<td height="30">
			<p align="center">
			<font face="Verdana" style="font-size: 10pt; font-weight: 700" color="#000000">
			Questionnaire No. 3</font></p></td>
		</tr>
		<tr>
			<td height="19">
			<p align="center">
			<font face="Arial" style="font-size: 8.5pt" color="#000000">For 
			Field Survey (Village Level questionnaire) </font></p></td>
		</tr>
		<tr>
			<td height="18">
			<p align="center">
			<font style="font-size: 8.5pt" face="Arial" color="#000000">Page 3</font></p></td>
		</tr>
		<tr>
			<td><span style="font-weight: 700">
			<font face="Arial" style="font-size: 8.5pt" color="#000000">&nbsp;Form Id = <?php echo $frm?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;District Name = <?php echo $dis_name?></font></span></td>
		</tr>
		<tr><td>&nbsp;</td></tr>
		<tr>
			<td bgcolor="#EEEEEE" height="22"><font color="#000000">&nbsp;
			<span style="font-weight: 700">
			<font face="Arial" style="font-size: 8.5pt">4. </font></span></font>
			<span style="font-weight: 700">
			<font face="Arial" style="font-size: 8.5pt" color="#000000">MAIN 
			SOURCE OF DRINKING WATER (As existing in Main Village and Other 
			habitations) </font></span></td>
		</tr>
		<tr>
			<td>
			<table border="1" width="900" id="table4" cellspacing="0" cellpadding="0" bgcolor="#FDF9EE" style="border-collapse:collapse; border-color:#99CCCC;">
				<tr>
					<td colspan="14"><span style="font-size: 4pt">&nbsp;</span></td>
				</tr>
				<tr>
					<td width="165" align="center" rowspan="2" valign="top" bgcolor="#F7E6B7">
					<address>
						<font style="font-size: 8.5pt; font-style:normal" face="Verdana" color="#990000">
						Habitation</font></address>
				  </td>
				  <td align="center" width="52" rowspan="2" valign="top" bgcolor="#F7E6B7">
					<address>
						<font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">
						Type MH/ OH</font></address>
				  </td>
					<td height="27" colspan="2" align="center" valign="top" bgcolor="#F7E6B7">
					<address>
						<font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Hand Pump</font>
					</address>
				  </td>
					<td align="center" rowspan="2" colspan="" valign="top" bgcolor="#F7E6B7">
					<address>
						<span style="font-style: normal">
						<font face="Verdana" style="font-size: 8.5pt" color="#990000">Piped Water supply / P&amp;T water supply</font></span></address>
				  </td>
					<td align="center" width="50" rowspan="2" valign="top" bgcolor="#F7E6B7"><address><font face="Verdana" color="#990000"><span style="font-size: 8.5pt; font-style: normal">Tube Well</span>                    </font>
					</address>
				  </td>
					<td align="center" width="50" valign="top" rowspan="2" bgcolor="#F7E6B7">
					<address>
						<span style="font-style: normal">
						<font face="Verdana" style="font-size: 8.5pt" color="#990000">Dug Well</font></span>
					</address>
				  </td>
					<td align="center" width="51" valign="top" rowspan="2" bgcolor="#F7E6B7">
					<font face="Verdana" color="#990000">
					<span style="font-size: 8.5pt; font-style: normal">Public 
					Taps / Stand Posts</span></font>					</td>
					<td align="center" width="50" valign="top" rowspan="2" bgcolor="#F7E6B7">
					<font face="Verdana" color="#990000">
					<span style="font-size: 8.5pt; font-style: normal">Rain 
					Water Tanka</span></font></td>
					<td align="center" width="50" valign="top" rowspan="2" bgcolor="#F7E6B7">
					<font face="Verdana" color="#990000">
					<span style="font-size: 8.5pt; font-style: normal">Tanker 
					Truck</span></font>					</td>
					<td align="center" width="65" valign="top" rowspan="2" bgcolor="#F7E6B7"><address><span style="font-style: normal; font-size: 8.5pt"><font face="Verdana" color="#990000">Cart With small 
						Tank</font></span>
					</address>
				  </td>
					<td align="center" width="82" valign="top" rowspan="2" bgcolor="#F7E6B7">
					<font face="Verdana" color="#990000">
					<span style="font-size: 8.5pt; font-style: normal">Surface 
					water resources (River/ Dam/ Lake/ Pond/ Stream</span></font>					</td>
					<td align="center" width="57" valign="top" rowspan="2" bgcolor="#F7E6B7">
					<font face="Verdana" color="#990000">
					<span style="font-style: normal; font-size: 8.5pt">Irrigation Canal</span></font>					</td>
					<td align="center" width="54" valign="top" rowspan="2" bgcolor="#F7E6B7">
					<font face="Verdana" color="#990000">
					<span style="font-size: 8.5pt; font-style: normal">Others 
					(Specify Baori, public tanka (size)</span></font>					</td>
				</tr>
				<tr>
					<td align="center" width="48" valign="top" bgcolor="#F7E6B7">
					<font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">
					Govt.</font></td>
					<td align="center" width="43" valign="top" bgcolor="#F7E6B7">
					<font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">
					Pvt.</font></td>
				</tr>
				<?php
				$qr2="select * from tbl_dtls_q3_water_source where loc_id='$id1' order by habitation_code asc";
				$res2=mysql_query($qr2);
				while($row=mysql_fetch_array($res2))
				{
				?>
				<tr>
					<td width="165" align="center">
						<label id="habitation_name"><font style="font-size: 8.5pt; font-style:normal" face="Verdana"><?php echo "$row[habitation_name]";?></font></label>
				  </td>
				  <td align="center" width="52"><label id="type_habit"><font style="font-size: 8.5pt; font-style:normal" face="Verdana"><?php echo "$row[type_habit]";?></font></label></td>
					<td width="48" align="center">
				  <label id="handpump_govt"><font style="font-size: 8.5pt; font-style:normal" face="Verdana"><?php echo "$row[handpump_govt]";?></font></label></td>
					<td width="43" align="center">
				  <label id="handpump_pvt"><font style="font-size: 8.5pt; font-style:normal" face="Verdana"><?php echo "$row[handpump_pvt]";?></font></label></td>
					<td width="68" align="center">
				  <label id="piped_water"><font style="font-size: 8.5pt; font-style:normal" face="Verdana"><?php echo "$row[piped_water]";?></font></label></td>
					<td width="50" align="center">
				  <label id="tubewell"><font style="font-size: 8.5pt; font-style:normal" face="Verdana"><?php echo "$row[tubewell]";?></font></label></td>
					<td width="50" align="center">
				  <label id="dugwell"><font style="font-size: 8.5pt; font-style:normal" face="Verdana"><?php echo "$row[dugwell]";?></font></label></td>
					<td width="51" align="center">
				  <label id="public_tap"><font style="font-size: 8.5pt; font-style:normal" face="Verdana"><?php echo "$row[public_tap]";?></font></label></td>
					<td width="50" align="center">
			  <label id="rain_water_tank"><font style="font-size: 8.5pt; font-style:normal" face="Verdana"><?php echo "$row[rain_water_tank]";?></font></label></td>
					<td width="50" align="center">
				  <label id="tanker_truck"><font style="font-size: 8.5pt; font-style:normal" face="Verdana"><?php echo "$row[tanker_truck]";?></font></label></td>
					<td width="65" align="center">
				  <label id="small_tank"><font style="font-size: 8.5pt; font-style:normal" face="Verdana"><?php echo "$row[small_tank]";?></font></label></td>
					<td width="82" align="center">
				  <label id="surface_water"><font style="font-size: 8.5pt; font-style:normal" face="Verdana"><?php echo "$row[surface_water]";?></font></label></td>
					<td width="57" align="center">
				  <label id="irrigation_canal"><font style="font-size: 8.5pt; font-style:normal" face="Verdana"><?php echo "$row[irrigation_canal]";?></font></label></td>
					<td width="54" align="center">
				  <label id="other_source"><font style="font-size: 8.5pt; font-style:normal" face="Verdana"><?php echo "$row[other_source]";?></font></label></td>
				</tr>
				<?php 
				} ?>
				</table>
			</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
		</tr>
		<tr>
			<td bgcolor="#EEEEEE" height="22"><font color="#000000">
			<span style="font-weight: 700">
			<font face="Arial" style="font-size: 8.5pt">&nbsp; 5.&nbsp; </font>			</span></font><span style="font-weight: 700">
			<font face="Arial" style="font-size: 8.5pt" color="#000000">Do PHED 
			Treat Water to make it safe:&nbsp;&nbsp;&nbsp; <?php echo "$row1[phed_water_safe]";?></font></span></td>
		</tr>
		<tr>
			<td>&nbsp;</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
		</tr>
		<tr>
			<td bgcolor="#EEEEEE" height="22"><font color="#000000">
			<span style="font-weight: 700">
			<font face="Arial" style="font-size: 8.5pt">&nbsp; 6.&nbsp; </font>			</span></font><span style="font-weight: 700">
			<font face="Arial" style="font-size: 8.5pt" color="#000000">Do you 
			treat your water to make it safe:&nbsp;&nbsp;&nbsp;&nbsp;<?php echo "$row1[you_water_safe]";?></font></span></td>
		</tr>
		<tr>
			<td>&nbsp;</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
		</tr>
		<tr>
			<td bgcolor="#EEEEEE" height="22"><span style="font-weight: 700">
			<font face="Arial" style="font-size: 8.5pt" color="#000000">&nbsp; 
			If yes : </font></span></td>
		</tr>
		<tr>
			<td>
				<div id="show">
				<table border="1" width="900" id="table7" cellspacing="0" cellpadding="0" bgcolor="#FDF9EE" style="border-collapse:collapse; border-color:#99CCCC;">
					<tr>
						<td colspan="12"><span style="font-size: 4pt">&nbsp;</span></td>
					</tr>
					<tr>
						<td width="145" align="center" valign="top" bgcolor="#F7E6B7">
							<address>
							<font style="font-size: 8.5pt; font-style:normal" face="Verdana" color=                        	"#990000">Name of Habitation</font></address>					  </td>
								<td align="center" width="88" valign="top" bgcolor="#F7E6B7">
									<span style="font-style: normal">
									<font face="Verdana" style="font-size: 8.5pt" color="#990000">
									Boil</font></span>								</td>
								<td align="center" width="88" valign="top" bgcolor="#F7E6B7">
									<span style="font-style: normal">
									<font face="Verdana" style="font-size: 8.5pt" color="#990000">
									Use Alum</font></span>								</td>
								
								<td align="center" width="75" valign="top" bgcolor="#F7E6B7">
									<font face="Verdana" style="font-size: 8.5pt" color="#990000">
									Add Bleach/ powder chorine Tablets </font>								</td>
								<td align="center" width="59" valign="top" bgcolor="#F7E6B7">
									<font style="font-size: 8.5pt" face="Verdana" color="#990000">
									Strain through a cloth</font>								</td>
								
								<td align="center" width="93" valign="top" bgcolor="#F7E6B7">
									<font face="Verdana" style="font-size: 8.5pt" color="#990000">
									Use water Filter (Ceramic / Sand / Composite)</font>								</td>
								<td align="center" width="76" valign="top" bgcolor="#F7E6B7">
									<font face="Verdana" style="font-size: 8.5pt" color="#990000">
									Use Electronic Purifier</font>								</td>
								<td align="center" width="77" valign="top" bgcolor="#F7E6B7">
									<font face="Verdana" style="font-size: 8.5pt" color="#990000">
									Let it stand and settle</font>								</td>
								<td align="center" width="71" valign="top" bgcolor="#F7E6B7">
									<span style="font-style: normal">
									<font face="Verdana" style="font-size: 8.5pt" color="#990000">
									DDFU</font></span>								</td>
								<td align="center" width="117" valign="top" bgcolor="#F7E6B7">
									<font style="font-size: 8.5pt" face="Verdana" color="#990000">
									Others (Specify)</font></td>
				  </tr>
				<?php
				$qr2="select * from tbl_dtls_q3_water_safe where loc_id='$id1' order by habitation_code asc";
				$res2=mysql_query($qr2);
				while($row=mysql_fetch_array($res2))
				{
				?>
				<tr>
					<td width="145" align="center">
						<label id="habitation_name"><font face="Verdana" style="font-size: 8.5pt"><?php echo "$row[habitation_name]";?></font></label></td>
					<td width="88" align="center" colspan="9"><label id="way_pure_water"><font face="Verdana" style="font-size: 8.5pt"><?php echo "$row[way_pure_water]";?></font></label></td>
				</tr>
				<?php
				} ?>
				</table>
				</div>
			</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
		</tr>
		<tr>
			<td><font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#FF0000">
				&nbsp;&nbsp;</font>			</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
		</tr>
		<tr>
			<td>
			<p align="center">
			<input type="submit" value="Back" name="back" style="font-size: 8pt;font-family:Verdana; border-style: solid; border-width: 1px">&nbsp;&nbsp;
			<input type="submit" value="Next" name="submit" style="font-size: 8pt; font-family: Verdana; border-style: solid; border-width: 1px" /></p>
			</td>
		</tr>
		
	</table>
	</form>
</div>
</body>
</html>
